package com.dz51.core.validate.vo;

import com.dz51.core.validate.validator.strategy.MaxFullLenValidator;
import com.dz51.core.validate.validator.strategy.MaxLenValidator;
import com.dz51.core.validate.validator.strategy.MinFullLenValidator;
import com.dz51.core.validate.validator.strategy.MinLenValidator;
import com.dz51.core.validate.validator.strategy.NoneValidator;
import com.dz51.core.validate.validator.strategy.NotNullValidator;
import com.dz51.core.validate.validator.strategy.RegexValidator;
import com.dz51.core.validate.validator.strategy.ValidateModel;

public enum ValidateType{
    NONE(new NoneValidator()), 
    NOT_NULL(new NotNullValidator()), 
    // 长度不区分全、半角
    MIN_LENGTH(new MinLenValidator()), 
    MAX_LENGTH(new MaxLenValidator()),
    // 长度区分全、半角
    MIN_FULL_LENGTH(new MinFullLenValidator()),
    MAX_FULL_LENGTH(new MaxFullLenValidator()),
    REGEX(new RegexValidator()), 
//    TRIM(new TrimValidator()), 
//    TO_HTML(null)
    ;
    private ValidateModel validateModel;
    
    private ValidateType(ValidateModel validateModel) {
        this.validateModel = validateModel;
    }

    public ValidateModel getValidateModel(){
        return this.validateModel;
    }
}